package cn.hesion.designpattern.StrategyPattern.Pay.payPort;

public abstract  class PayMent {
    //支付类型
    public abstract String getName();
    //查询余额
    public abstract double queryBalance(String uId);

    public PayState pay(String uId,double amount){
        if(queryBalance(uId) < amount){
            return new PayState(500,"支付失败","余额不足");
        }
        return new PayState(200,"支付成功","支付金额"+amount);
    }
}
